import Vue from 'vue';
import VueRouter from 'vue-router';
import frist from '../views/frist.vue';
import sort from '../views/sort.vue';
import my from '../views/my.vue';
import my01 from '../views/my01.vue';
// import swipe from '../views/swipe.vue';
// import Vue from 'vue'
// import VueRouter from 'vue-router'
import find from '../views/find.vue'
import login from '../views/login.vue'
import phonelogin from '../views/phonelogin.vue'
import pwdlogin from '../views/pwdlogin.vue'
import details from '../views/details.vue'

// import Home from '../views/Home.vue';
import Activity from '../views/activity.vue'
import Logout from '../views/logout.vue'
import Scheduling from '../views/scheduling.vue'
import Journey from '../views/journey.vue'



Vue.use(VueRouter);

const routes = [
  {
    path:'/',
    name:'home',
    component: () => import('../views/Home'),
    children:[
      {
        path: '/first',
        name: 'frist',
        component: frist,
    
      },
      {
        path: '/find',
        name: 'find',
        component: find
      },
    ]
  }, 
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/phonelogin',
    name: 'phonelogin',
    component: phonelogin
  },
  {
    path: '/pwdlogin',
    name: 'pwdlogin',
    component: pwdlogin
  },
  {
    path: '/details',
    name: 'details',
    component: details
  },
  {
    path: '/sort',
    // name: '',
    component: sort,
  },
  {
    path: '/my',
    // name: '',
    component: my,
  },
  // {
  //   path: '/swipe',
  //   // name: '',
  //   component: swipe,
  // },
  {
    path: '/Activity',
    component: Activity
  },
  {
    path: '/Journey',
    component: Journey
  },
  {
    path: '/Scheduling',
    component: Scheduling
  },
  {
    path: '/Logout',
    component: Logout
  },

];

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
});

export default router;



// Vue.use(VueRouter);

// const routes = [
    // {
    //     path: '/',
    //     name: 'Home',
    //     component: Home,
    // },

    // {
    //     path: '/about',
    //     name: 'About',
    //     // route level code-splitting
    //     // this generates a separate chunk (about.[hash].js) for this route
    //     // which is lazy-loaded when the route is visited.
    //     component: () =>
    //         import ( /* webpackChunkName: "about" */ '../views/About.vue'),
    // },
// ];

// const router = new VueRouter({
//     mode: 'history',
//     base: process.env.BASE_URL,
//     routes,
// });

// export default router;
